const router = require('koa-router')()
const { loanList, createLoan, updateLoan, deleteLoan, submitToApprove, queryLoan } = require('../controllers/loan.js')

router.prefix('/loan')
.get('/list', loanList)
.post('/create', createLoan)
.put('/update', updateLoan)
.delete('/delete/:delId', deleteLoan)
.post('/submitToApprove', submitToApprove)
.get('/query', queryLoan)

module.exports = router